'use strict';

const db = uniCloud.database();
exports.main = async (event, context) => {
	// 定时删除央视错误日志
	let collection = await db.collection('cctvJfscErrLog');
	// 清理全部数据
	let res = await collection.get()
	res.data.map(async(document) => {
	  return await collection.doc(document._id).remove();
	});
};
